/*
	Name:2_3
	Copyright:Take it at will
	Author:Rodney
	Date: 
	Description:
*/
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int totsubstrnum(char *str,char *substr);

int main()
{
    char s1[100],s2[100];
    gets(s1);gets(s2);
    printf("%d\n",totsubstrnum(s1,s2));
}

int totsubstrnum(char *str,char *substr)
{
    int l=strlen(str),subl=strlen(substr);
    int i,j,count=0;
    for(i=0;i<l-subl+1;i++)
        if(str[i] == substr[0])
        {
            for(j=1;j<subl;j++)
                if(str[i+j] != substr[j])   break;
            if(j>=subl)   count++;
        }
    return count;
}
